The invention relates to modems.
A modem (xe2x80x9cmodulator-demodulatorxe2x80x9d) is an electronic device that converts digital information to and from an analog form for communication over an analog communication channel such as a telephone or cable television line. In a typical modem, the conversion goes through an intermediate form, in which the analog form is represented in the form of digital samples. The digital samples are an alternative way to represent the digital information, similar to the way an acoustic waveform is digitally represented in the binary data stored on a music CD.
A modem typically was implemented as a separate piece of hardware communicatively coupled to a computer""s host central processing unit (CPU). A modem may also be implemented as a process executing on the host CPU. The host CPU, however, may be a shared resource executing any number of processes, in which the host CPU dedicates separate periods of time (time slices) to each process. Consequently, competition for the host CPU can delay translation of digital transmit data into an analog waveform (i.e., a data starvation condition). A data starvation condition could also occur if the modem transmits information faster than the computer supplies transmit data. Modem implementation standards such as xe2x80x9cV.90xe2x80x9d, xe2x80x9cV.34xe2x80x9d, and xe2x80x9cV.32xe2x80x9d, however, require that an operative modem continuously transmit an analog signal, even if transmit data are unavailable.
The invention features techniques for reducing transmit latency in a computer modem without sacrificing reliability.
In general, in a first aspect, the invention features a method of conveying transmit data samples followed by fill data samples to a transmit buffer, the transmit data samples encoding transmit data generated for transmission to a receiver, the fill data samples having been generated to consume transmission time when transmit data are unavailable. The transmit buffer is segmented into a plurality of blocks for storing the transmit data samples and fill data samples, the number of blocks being smaller than the total sample capacity of the transmit buffer. The total number of samples conveyed to the transmit buffer is chosen to fill the transmit buffer to a boundary between the blocks. The contents of the transmit buffer are conveyed to the receiver. After filling a current block of the transmit buffer with transmit data samples and fill data samples, fill data samples in the current block are replaced with transmit data samples if additional transmit data samples become available prior to conveying the fill data samples to the receiver.
In general, in a second aspect, the invention features a method of conveying samples including transmit data samples and fill data samples to a transmit buffer, the transmit data samples encoding transmit data for transmission to a receiver, the fill data samples having been generated to consume transmission time when transmit data are unavailable. The transmit buffer is segmented into a plurality of blocks for storing the samples, the number of blocks being much smaller than the total sample capacity of the transmit buffer. The total number of samples conveyed to the transmit buffer is chosen to fill the transmit buffer to a boundary between the blocks. The method additionally includes the step of determining whether to reconvey samples to the current block after filling the current block, or whether to convey samples to exactly fill a next block.
In general, in a third aspect, the invention features a method of storing transmit data samples followed by fill data samples in a transmit buffer, the transmit data samples encoding transmit data generated for transmission to a receiver, the fill data samples being predetermined samples to send in the absence of transmit data samples. The contents of the transmit buffer are conveyed to the receiver. Fill data samples in the transmit buffer are replaced with transmit data samples if additional transmit data samples become available prior to conveying the fill data samples to the receiver.
Embodiments of the invention may include one or more of the following features. The transmit buffet may be segmented into multiple blocks for storing transmit data samples and fill data samples, so that a process conveying samples to the transmit buffer leaves the transmit buffer filled to a segment boundary. The multiple blocks may be of equal size. Fill data samples in the current block may be replaced prior to conveying transmit data samples or fill data samples to the next block. Determining whether to reconvey samples to the current block may be based in part on determining whether the current block contains fill data samples, whether additional transmit data are available, or whether samples from the current block have been transmitted to the receiver, or any combination of the three. The method may reconvey the entire block or only the portion of the current block containing fill data samples, replacing fill data samples with new transmit data samples to the extent that new transmit data are available and, if necessary, filling any remaining portion of the block with fill data samples. A block may be initialized with fill data samples, and the fill data samples overwritten with transmit data samples to the extent transmit data samples become available. The state of a converter that converts the transmit data to transmit data samples may be saved as the conveying crosses a block boundary in the transmit buffer, or as the first fill sample is conveyed to a block, and the saved state may be restored when reconveying samples. An analog waveform may be generated from samples in the transmit buffer for transmission to the receiver. The method may cancel echoes in received samples induced by transmitting the samples to the receiver. A program stored on a computer storage medium may be designed to perform the above method.
Particular embodiments of the invention may feature one or more of the following advantages. The numerically-intensive signal processing and logically intensive protocol management of a modem process can both be performed in the microprocessor of a computer system, reducing system cost. The sample buffer size may be increased to help assure that samples are always available for transmission, thereby complying with modem implementation standards. Simultaneously, the time delay or latency between when data enter the modem and when the data are subsequently transmitted can be reduced, by moving actual transmit data samples further forward in the sample buffer than would otherwise be possible.
The above advantages and features are of representative embodiments only, and are presented only to assist in understanding the invention. It should be understood that they are not to be considered limitations on the invention as defined by the claims, or equivalents to the claims. For instance, some pairs of these advantages are mutually contradictory, in that they cannot be simultaneously present in a single embodiment. Similarly, some advantages are applicable to one aspect of the invention, and inapplicable to others. Thus, no single advantage should be considered dispositive in determining equivalence. Additional features and advantages of the invention will become apparent in the following description, from the drawings, and from the claims.